package com.project.workjob.util;

import com.project.workjob.entity.GjxlYb;

import java.util.ArrayList;
import java.util.List;

public class GjxlYbUtil {

    public static List<GjxlYb> getData(List<List<String>> dataList) throws Exception {
        List<GjxlYb> list = new ArrayList<>();
        try {
            for (List<String> data : dataList) {
                GjxlYb entity = new GjxlYb();
                for (int i = 0; i < data.size(); i++) {
                    switch (i) {
                        case 0:
                            entity.setId(data.get(0));
                            break;
                        case 1:
                            entity.setReport_id(data.get(1));
                            break;
                        case 2:
                            entity.setLine_id(data.get(2));
                            break;
                        case 3:
                            entity.setSpecial_line(data.get(3));
                            break;
                        case 4:
                            entity.setNo1(data.get(4));
                            break;
                        case 5:
                            entity.setNo2(data.get(5));
                            break;
                        case 6:
                            entity.setNo3(data.get(6));
                            break;
                        case 7:
                            entity.setNo4(data.get(7));
                            break;
                        case 8:
                            entity.setNo5(data.get(8));
                            break;
                        case 9:
                            entity.setNo6(data.get(9));
                            break;
                        case 10:
                            entity.setNo7(data.get(10));
                            break;
                        case 11:
                            entity.setNo8(data.get(11));
                            break;
                        case 12:
                            entity.setNo9(data.get(12));
                            break;
                        case 13:
                            entity.setNo10(data.get(13));
                            break;
                        case 14:
                            entity.setNo11(data.get(14));
                            break;
                        case 15:
                            entity.setNo12(data.get(15));
                            break;
                        case 16:
                            entity.setNo13(data.get(16));
                            break;
                        case 17:
                            entity.setNo14(data.get(17));
                            break;
                        case 18:
                            entity.setNo15(data.get(18));
                            break;
                        case 19:
                            entity.setNo16(data.get(19));
                            break;
                        case 20:
                            entity.setNo17(data.get(20));
                            break;
                        case 21:
                            entity.setNo18(data.get(21));
                            break;
                        case 22:
                            entity.setNo19(data.get(22));
                            break;
                        case 23:
                            entity.setNo20(data.get(23));
                            break;
                        case 24:
                            entity.setNo21(data.get(24));
                            break;
                        case 25:
                            entity.setNo22(data.get(25));
                            break;
                        case 26:
                            entity.setNo23(data.get(26));
                            break;
                        case 27:
                            entity.setNo24(data.get(27));
                            break;
                        case 28:
                            entity.setNo25(data.get(28));
                            break;
                        case 29:
                            entity.setNo26(data.get(29));
                            break;
                        case 30:
                            entity.setNo27(data.get(30));
                            break;
                        case 31:
                            entity.setNo28(data.get(31));
                            break;
                        case 32:
                            entity.setNo29(data.get(32));
                            break;
                        case 33:
                            entity.setNo30(data.get(33));
                            break;
                        case 34:
                            entity.setNo31(data.get(34));
                            break;
                        case 35:
                            entity.setNo32(data.get(35));
                            break;
                        case 36:
                            entity.setNo33(data.get(36));
                            break;
                        case 37:
                            entity.setNo34(data.get(37));
                            break;
                        case 38:
                            entity.setNo35(data.get(38));
                            break;
                        case 39:
                            entity.setNo36(data.get(39));
                            break;
                        case 40:
                            entity.setNo37(data.get(40));
                            break;
                        case 41:
                            entity.setNo38(data.get(41));
                            break;
                        case 42:
                            entity.setNo39(data.get(42));
                            break;
                        case 43:
                            entity.setNo40(data.get(43));
                            break;
                        case 44:
                            entity.setNo41(data.get(44));
                            break;
                        case 45:
                            entity.setNo42(data.get(45));
                            break;
                        case 46:
                            entity.setNo43(data.get(46));
                            break;
                        case 47:
                            entity.setNo44(data.get(47));
                            break;
                        case 48:
                            entity.setNo45(data.get(48));
                            break;
                        case 49:
                            entity.setNo46(data.get(49));
                            break;
                        case 50:
                            entity.setNo47(data.get(50));
                            break;
                        case 51:
                            entity.setNo48(data.get(51));
                            break;
                        case 52:
                            entity.setNo49(data.get(52));
                            break;
                        case 53:
                            entity.setNo50(data.get(53));
                            break;
                        case 54:
                            entity.setNo51(data.get(54));
                            break;
                        case 55:
                            entity.setNo52(data.get(55));
                            break;
                        case 56:
                            entity.setNo53(data.get(56));
                            break;
                        case 57:
                            entity.setNo54(data.get(57));
                            break;
                        case 58:
                            entity.setNo55(data.get(58));
                            break;
                        case 59:
                            entity.setNo56(data.get(59));
                            break;
                        case 60:
                            entity.setNo57(data.get(60));
                            break;
                        case 61:
                            entity.setNo58(data.get(61));
                            break;
                        case 62:
                            entity.setNo59(data.get(62));
                            break;
                        case 63:
                            entity.setNo60(data.get(63));
                            break;
                        case 64:
                            entity.setNo61(data.get(64));
                            break;
                        case 65:
                            entity.setNo62(data.get(65));
                            break;
                        case 66:
                            entity.setNo63(data.get(66));
                            break;
                        case 67:
                            entity.setNo64(data.get(67));
                            break;
                        case 68:
                            entity.setNo65(data.get(68));
                            break;
                        case 69:
                            entity.setNo66(data.get(69));
                            break;
                        case 70:
                            entity.setNo67(data.get(70));
                            break;
                        case 71:
                            entity.setNo68(data.get(71));
                            break;
                        case 72:
                            entity.setNo69(data.get(72));
                            break;
                        case 73:
                            entity.setNo70(data.get(73));
                            break;
                        case 74:
                            entity.setNo71(data.get(74));
                            break;
                        case 75:
                            entity.setNo72(data.get(75));
                            break;
                        case 76:
                            entity.setNo73(data.get(76));
                            break;
                        case 77:
                            entity.setNo74(data.get(77));
                            break;
                        case 78:
                            entity.setNo75(data.get(78));
                            break;
                        case 79:
                            entity.setNo76(data.get(79));
                            break;
                        case 80:
                            entity.setNo77(data.get(80));
                            break;
                        case 81:
                            entity.setNo78(data.get(81));
                            break;
                        case 82:
                            entity.setNo79(data.get(82));
                            break;
                        case 83:
                            entity.setNo80(data.get(83));
                            break;
                        case 84:
                            entity.setNo81(data.get(84));
                            break;
                        case 85:
                            entity.setNo82(data.get(85));
                            break;
                        case 86:
                            entity.setNo83(data.get(86));
                            break;
                        case 87:
                            entity.setNo84(data.get(87));
                            break;
                        case 88:
                            entity.setNo85(data.get(88));
                            break;
                        case 89:
                            entity.setLine_type(data.get(89));
                            break;
                        case 90:
                            entity.setCreate_by(data.get(90));
                            break;
                        case 91:
                            entity.setCreate_time(data.get(91));
                            break;
                        case 92:
                            entity.setUpdate_by(data.get(92));
                            break;
                        case 93:
                            entity.setUpdate_time(data.get(93));
                            break;
                        case 94:
                            entity.setReport_time(data.get(94));
                            break;
                    }
                }
                list.add(entity);
            }
            return list;
        } catch (Exception e) {
            throw new Exception(e.getMessage());
        }
    }
}
